var g, _extends = Object.assign || function(t) {
  for (var e = 1; e < arguments.length; e++) {
      var a, r = arguments[e];
      for (a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
  }
  return t;
},  app = getApp(), page = app.page, request = app.util.request, toast = app.toast;
page({
  data: {
      score: 0
  },
  onLoad: function(t) {
    wx.setNavigationBarColor({
      backgroundColor: "#e4e4e4",
      frontColor: "#333333"
    })
      g = this;
      let userInfo = wx.getStorageSync("userInfo")
      if(userInfo){
        request({
          url: "AddUsersLog",
          data: {
            user_id: userInfo.id,
            url: '/fenxiao/integral/integral',
            title: "我的积分"
          },
          success: function(a) {
          }
        })
        request({
          url: "Score",
          data: {
            user_id: userInfo.id
          },
          success: function(a) {
            g.setData({
              score: a
            })
          }
        })
      }
  },
  onReady: function() {
  
  },
  onShow: function() {
      
  },
  onPullDownRefresh: function() {
     
  },
  toPage: function(t) {
      var e = t.currentTarget.dataset.url;
      switch (e) {
        case 'upgrade' :
          wx.navigateTo({
            url: "/fenxiao/upgrade/upgrade",
          })
        break;
        default:
          route({
              type: "navigate",
              url: e
          });
      }
  }
});